Intra prediction method and apparatus using the method

ABSTRACT

An intra prediction method and a device using the intra prediction method are provided. The intra prediction method using a DC mode includes setting a bottom-right pixel to a DC-predicted value, interpolating the bottom-right pixel and an n-th top reference pixel to derive predicted values of an n-th column and interpolating the bottom-right pixel and an n-th left reference pixel to derive predicted values of an n-row, and performing bidirectional linear interpolation to derive predicted values of pixels included in a prediction unit other than the n-th row and the n-th column.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.13/997,385, filed Jun. 24, 2013, now allowed, which is a U.S. NationalPhase Application under 35 U.S.C. §371 of International Application No.PCT/KR2011/009954, filed on Dec. 21, 2011, which claims the benefit ofU.S. Provisional Application No. 61/426,480, filed on Dec. 22, 2010,U.S. Provisional Application No. 61/451,121, filed on Mar. 10, 2011,U.S. Provisional Application No. 61/471,185, filed on Apr. 3, 2011, U.S.Provisional Application No. 61/475,636, filed on Apr. 14, 2011, and U.S.Provisional Application No. 61/476,311, filed on Apr. 17, 2011, all ofwhich are incorporated by reference.

TECHNICAL FIELD

The present invention relates to an intra method and a device using theintra prediction method, and more particularly, to an encoding methodand an encoding device.

BACKGROUND ART

Recently, demands for a high-resolution and high-quality image such asan HD (High Definition) image and an UHD (Ultra High Definition) imagehave increased in various fields of applications. As image data hashigher resolution and higher quality, an amount of data more increasesrelative to existing image data. Accordingly, when image data istransferred using media such as existing wired and wireless broad bandlines or is stored in existing storage media, the transfer cost and thestorage cost increases. In order to solve these problems occurring withan increase in resolution and quality of image data, high-efficiencyimage compressing techniques can be utilized.

The image compressing techniques include various techniques such as aninter prediction technique of predicting pixel values included in acurrent picture from previous or subsequent pictures of the currentpicture, an intra prediction technique of predicting pixel valuesincluded in a current picture using pixel information in the currentpicture, and an entropy encoding technique of assigning a short code toa value with a high appearance frequency and assigning a long code to avalue with a low appearance frequency. Image data can be effectivelycompressed and transferred or stored using such image compressingtechniques.

SUMMARY OF INVENTION Technical Problem

An object of the invention is to provide an intra prediction methodwhich can enhance image encoding and decoding efficiency.

Another object of the invention is to provide a device that performs anintra prediction method which can enhance image encoding and decodingefficiency.

Technical Solution

According to an aspect of the invention, there is provided an intraprediction method using a DC mode, including: setting a bottom-rightpixel to a DC-predicted value; interpolating the bottom-right pixel andan n-th top reference pixel to derive predicted values of an n-th columnand interpolating the bottom-right pixel and an n-th left referencepixel to derive predicted values of an n-row; and performingbidirectional linear interpolation to derive predicted values of pixelsincluded in a prediction unit other than the n-th row and the n-thcolumn.

According to another aspect of the invention, there is provided an intraprediction method using a DC mode, including: setting a bottom-rightpixel using an average of a top-left reference pixel, an n-th topreference pixel, and an n-th left reference pixel; interpolating thebottom-right pixel and an n-th top reference pixel to derive predictedvalues of an n-th column and interpolating the bottom-right pixel and ann-th left reference pixel to derive predicted values of an n-row; andperforming bidirectional linear interpolation to derive predicted valuesof pixels included in a prediction unit other than the n-th row and then-th column.

According to still another aspect of the invention, there is provided anintra prediction method using a DC mode, including: setting abottom-right pixel to a DC-predicted value; interpolating thebottom-right pixel and an n-th top reference pixel to derive predictedvalues of an n-th column and interpolating the bottom-right pixel and ann-th left reference pixel to derive predicted values of an n-row;performing diagonal interpolation on the basis of top reference pixels,left reference pixels, and the predicted values of the n-th column andthe n-th row to derive first predicted values of pixels included in aprediction unit other than the n-th row and the n-th column; andperforming bidirectional linear interpolation on pixels located on thetop, bottom, left, and right of the pixels included in the predictionunit other than the n-th row and the n-th column to derive secondpredicted values of pixels.

According to still another aspect of the invention, there is provided anintra prediction method using a DC mode, including: setting abottom-right pixel using an average of a top-left reference pixel, ann-th top reference pixel, and an n-th left reference pixel;interpolating the bottom-right pixel and an n-th top reference pixel toderive predicted values of an n-th column and interpolating thebottom-right pixel and an n-th left reference pixel to derive predictedvalues of an n-row; performing diagonal interpolation on the basis oftop reference pixels, left reference pixels, and the predicted values ofthe n-th column and the n-th row to derive first predicted values ofpixels included in a prediction unit other than the n-th row and then-th column; and performing bidirectional linear interpolation on pixelslocated on the top, bottom, left, and right of the pixels included inthe prediction unit other than the n-th row and the n-th column toderive second predicted values of pixels.

According to still another aspect of the invention, there is provided anintra prediction method using a vertical intra prediction mode,including: generating predicted values of pixels included in an n-th rowusing average values of top reference pixels and an n-th left referencepixel; and interpolating the pixels included in the n-th row and the topreference pixels to derive predicted values of the pixels other than then-th row in a prediction unit.

According to still another aspect of the invention, there is provided anintra prediction method using a horizontal intra prediction mode,including: calculating average values of left reference pixel values andan (n+1)-th top reference pixel value to generate predicted values ofpixels included in an n-th column; and interpolating the pixels includedin the n-th column and the left reference pixels to derive predictedvalues of the pixels other than the n-th column in a prediction unit.

According to still another aspect of the invention, there is provided anintra prediction method using a planar mode, including: deriving apredicted value of a bottom-right pixel; using an interpolated value ofthe predicted value of the bottom-right pixel and an n-th left referencepixel as a predicted value of pixels included in an n-th row and usingan interpolated value of the predicted value of the bottom-right pixeland an n-th top reference pixel as a predicted value of pixels includedin an n-th column; and performing bidirectional interpolation on topreference pixels included in the same column in the vertical directionas a prediction target pixel and the pixels of the n-th row and leftreference pixels included in the same row in the horizontal direction asthe prediction target pixel and the pixels of the n-th column to derivepredicted values of pixels other than the n-th row and the n-th columnin a prediction unit. The deriving of the predicted value of thebottom-right pixel may include calculating an average value of the n-thleft reference pixel and the n-th top reference pixel as the predictedvalue of the bottom-right pixel. The deriving of the predicted value ofthe bottom-right pixel may include calculating an average value of the2n-th top reference pixel and the 2n-th left reference pixel as thepredicted value of the bottom-right pixel. The deriving of the predictedvalue of the bottom-right pixel may include: calculating a top averagepixel which is an average value of the n-th top reference pixel and the2n-th top reference pixel and a left average pixel which is an averagevalue of the n-th left reference pixel and the 2n-th left referencepixel; and calculating an average value of the top average pixel and theleft average pixel as the predicted value of the bottom-right pixel. Thederiving of the predicted value of the bottom-right pixel may includederiving the predicted value of the bottom-right pixel using an averagevalue of a top middle pixel located in the middle between the n-th topreference pixel and the 2n-th top reference pixel and a left middlepixel located in the middle between the n-th left reference pixel andthe 2n-th left reference pixel.

According to still another aspect of the invention, there is provided anintra prediction method using a planar mode, including: deriving apredicted value of a bottom-right pixel; using values of from an(n+1)-th left reference pixel to an 2n-th left reference pixel aspredicted values of pixels included in an n-th row and using values offrom an (n+1)-th top reference pixel to an 2n-th top reference pixel aspredicted values of pixels included in an n-th column; and performingbidirectional interpolation on top reference pixels included in the samecolumn in the vertical direction as a prediction target pixel and thepixels of the n-th row and left reference pixels included in the samerow in the horizontal direction as the prediction target pixel and thepixels of the n-th column to derive predicted values of pixels otherthan the n-th row and the n-th column in a prediction unit.

According to still another aspect of the invention, there is provided anintra prediction method using a planar mode, including: deriving apredicted value of a bottom-right pixel; performing bidirectionalinterpolation on values of from an (n+1)-th left reference pixel to an2n-th left reference pixel and values of from an (n+1)-th top referencepixel to an 2n-th top reference pixel and using the interpolated valueas predicted values of pixels included in an n-th row and an n-thcolumn; and performing bidirectional interpolation on top referencepixels included in the same column in the vertical direction as aprediction target pixel and the pixels of the n-th row and leftreference pixels included in the same row in the horizontal direction asthe prediction target pixel and the pixels of the n-th column to derivepredicted values of pixels other than the n-th row and the n-th columnin a prediction unit.

According to still another aspect of the invention, there is provided anintra prediction method using a planar mode, including: deriving a leftreference pixel value located in the same row in the horizontaldirection, a 2n-th top reference pixel value, a top reference pixelvalue located in the same column in the vertical direction, and an2n-left reference pixel value; and performing bidirectionalinterpolation on the left reference pixel value, the 2n-th top referencepixel value, the top reference pixel value, and the 2n-th left referencepixel value to derive predicted values of pixels included in aprediction unit.

According to still another aspect of the invention, there is provided anintra prediction method using a planar mode, including: performinghorizontal interpolation using a left reference pixel value located inthe same row in the horizontal direction and a 2n-th top reference pixelvalue; performing vertical interpolation using a top reference pixelvalue located in the same column in the vertical direction, and an2n-left reference pixel value; and deriving predicted values of pixelsincluded in a prediction unit by adding values obtained by multiplying apredetermined weight value by values obtained through the horizontalinterpolation and the vertical interpolation.

Advantageous Effects

As described above, by employing the intra prediction method and thedevice using the method according to the aspects of the invention, it ispossible to generate a prediction block having values close to thevalues of an original block at the time of performing the intraprediction method, thereby enhancing the encoding and decodingefficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an image encoding deviceaccording to an embodiment of the invention.

FIG. 2 is a block diagram illustrating an image decoding deviceaccording to another embodiment of the invention.

FIG. 3 is a diagram illustrating a prediction unit and reference pixelsaccording to the embodiment of the invention.

FIG. 4 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to the embodiment of the invention.

FIG. 5 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to the embodiment of the invention.

FIG. 6 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to the embodiment of the invention.

FIG. 7 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

FIG. 8 is a conceptual diagram illustrating a vertical intra predictionmethod according to an embodiment of the invention.

FIG. 9 is a conceptual diagram illustrating a horizontal intraprediction method according to an embodiment of the invention.

FIG. 10 is a conceptual diagram illustrating a method of deriving aprediction unit using an advanced planar mode according to an embodimentof the invention.

FIG. 11 is a conceptual diagram illustrating a method of deriving alower-right pixel in the intra prediction method using an advancedplanar mode according to an embodiment of the invention.

FIG. 12 is a conceptual diagram illustrating a method of deriving alower-right pixel in the intra prediction method using an advancedplanar mode according to an embodiment of the invention.

FIG. 13 is a conceptual diagram illustrating a method of deriving alower-right pixel in the intra prediction method using an advancedplanar mode according to an embodiment of the invention.

FIG. 14 is a conceptual diagram illustrating a method of generating alower-right pixel in the intra prediction method using an advancedplanar mode according to an embodiment of the invention.

FIG. 15 is a conceptual diagram illustrating a method of generating ann-th row and an n-th column at the time of performing the planar modeaccording to an embodiment of the invention.

FIG. 16 is a conceptual diagram illustrating a method of generating then-th row and the n-th column at the time of performing an advancedplanar mode according to an embodiment of the invention.

FIG. 17 is a conceptual diagram illustrating a prediction method usingan advanced planar mode according to an embodiment of the invention.

FIG. 18 is a conceptual diagram illustrating a prediction method usingthe planar mode according to an embodiment of the invention.

FIG. 19 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 20 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 21 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 22 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 23 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 24 is a conceptual diagram illustrating a prediction method usingan advanced DC mode according to an embodiment of the invention.

FIG. 25 is a conceptual diagram illustrating a prediction method usingan advanced planar mode according to an embodiment of the invention.

FIG. 26 is a conceptual diagram illustrating a method of performing aplanar mode when the 2n-th left reference pixel or the 2n-th topreference pixel are not present in the embodiment of the invention.

MODE FOR INVENTION

The present invention can be variously modified in various forms, andspecific embodiments thereof will be described and shown in thedrawings. However, the embodiments are not intended for limiting theinvention, but it should be understood that the invention includes allthe modifications, equivalents, and replacements belonging to the spiritand technical scope of the invention. In description with reference tothe drawings, like constituents are referenced by like referencenumerals.

Terms such as “first” and “second” can be used to describe variouselements, but the elements are not limited to the terms. The terms areused only to distinguish one element from another element. For example,without departing from the scope of the invention, a first element maybe named a second element and the second element may be named the firstelement similarly. The term, “and/or”, includes a combination of pluralelements or any one of the plural elements.

If it is mentioned that an element is “connected to” or “coupled to”another element, it should be understood that still another element maybe interposed therebetween, as well as that the element may be connectedor coupled directly to another element. On the contrary, if it ismentioned that an element is “connected directly to” or “coupleddirectly to” another element, it should be understood that still anotherelement is not interposed therebetween.

The terms used in the following description are used to merely describespecific embodiments, but are not intended to limit the invention. Anexpression of the singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

Hereinafter, exemplary embodiments of the invention will be described indetail with reference to the accompanying drawings. Like constituents inthe drawings will be referenced by like reference numerals and will notbe repeatedly described.

FIG. 1 is a block diagram illustrating an image encoding deviceaccording to an embodiment of the invention.

Referring to FIG. 1, an image encoding device 100 includes a picturedividing module 105, a prediction module 110, a transform module 115, aquantization module 120, a rearrangement module 125, an entropy encodingmodule 130, an inverse quantization module 135, an inverse transformmodule 140, a filter module 145, and a memory 150.

The constituent modules shown in FIG. 1 are independently shown torepresent different distinctive functions in the image encoding device.Each constituent module is not constructed by an independent hardwaremodule or software unit. That is, the constituent modules areindependently arranged and at least two constituent modules may becombined into a single constituent module or a single constituent modulemay be divided into plural constituent modules to perform functions.Embodiments in which the constituent modules are combined andembodiments in which the constituent modules are separated belong to thescope of the invention without departing from the concept of theinvention.

Some constituents are not essential to the substantial functions in theinvention and may be optional constituents for merely improvingperformance. The invention can be embodied to include only constituentsessential to embodiment of the invention, except for the constituentsused to merely improve performance. The structure including only theessential constituents except for the optical constituents used tomerely improve performance belongs to the scope of the invention.

The picture dividing module 105 can divide an input picture into atleast one process unit. Here, the process unit may be a prediction unit(PU), a transform unit (TU), or a coding unit (CU). The picture dividingmodule 105 can divide a picture into combinations of plural codingunits, prediction units, and transform units and can select acombination of coding units, prediction units, and transform units onthe basis of a predetermined criterion (for example, a cost function) toencode the picture.

For example, a picture can be divided into plural coding units. Arecursive tree structure such as a quad tree structure can be used todivide a picture into coding units. A coding unit which is divided intodifferent coding units with a picture or a coding unit of the largestsize as a root can be divided with child nodes corresponding to thenumber of divided coding units. A coding unit which cannot be dividedany more in accordance with a predetermined limitation is a leaf node.That is, when it is assumed that a coding unit can be divided in only asquare shape, a single coding unit can be divided into four differentcoding units.

In the embodiments of the invention, a coding unit can be used to have ameaning of a unit to be decoded as well as a unit to be encoded.

A prediction unit can be divided in at least one square or rectangularshape with the same size in a coding unit, or can be divided in shapessuch that the shape of one prediction unit out of the divided predictionunits in a coding unit is different from the shape of another predictionunit.

When a coding unit, which is used to generate a prediction unit to besubjected to intra prediction, is not a minimum coding unit, the codingunit can be subjected to intra prediction without being divided intoplural prediction units (N×N).

The prediction module 110 includes an inter prediction module thatperforms inter prediction and an intra prediction module that performsintra prediction. The prediction module can determine which of interprediction or intra prediction should be performed on a prediction unit,and can determine specific information (for example, intra predictionmode, motion vector, and reference picture) of the determined predictionmethod. At this time, the process unit on which the prediction isperformed may be different from the process unit for which theprediction method and the specific information are determined. Forexample, the prediction method and the prediction mode may be determinedfor each prediction unit and the prediction may be performed for eachtransform unit. Residual values (residual block) between the generatedpredicted block and the original block are input to the transform module115. The prediction mode information, the motion vector information, andthe like used for the prediction are encoded along with the residualvalues by the entropy encoding module 130 and are transmitted to thedecoding device. When a specific encoding mode is used, the originalblock may be encoded and transmitted to the decoding device withoutgenerating a predicted block through the use of the prediction module110.

The inter prediction module can predict a prediction unit on the basisof information of at least one picture of a previous picture and asubsequent picture of a current picture. The inter prediction moduleincludes a reference picture interpolation module, a motion predictionmodule, and a motion compensation module.

The reference picture interpolation module is supplied with referencepicture information from the memory 150 and generates pixel informationless than an integer pixel from the reference picture. In case of lumapixels, a DCT-based 8-tap interpolation filter having different filtercoefficients can be used to generate the pixel information less than aninteger pixel in the unit of ¼ pixel. In case of chroma pixels, aDCT-based 4-tap interpolation filters having different filtercoefficients can be used to generate the pixel information less than aninteger pixel in the unit of ⅛ pixel.

The motion prediction module can perform motion prediction on the basisof the reference picture interpolated by the reference pictureinterpolation module. Various methods such as FBMA (Full search-basedBlock Matching Algorithm), TSS (Three Step Search), and NTS (NewThree-Step Search Algorithm) can be used to derive a motion vector. Amotion vector has a motion vector value in the unit of ½ or ¼ pixel onthe basis of the interpolated pixel. The motion prediction module canpredict a current prediction unit using different motion predictionmethods. Various methods such as a skip method, a merging method, and anAMVP (Advanced Motion Vector Prediction) method can be used as themotion prediction method.

A method of constructing a predicted motion vector candidate list at thetime of performing inter prediction using the AMVP method according toan embodiment of the invention will be described below.

The intra prediction module can generate a prediction unit on the basisof reference pixel information around a current block which is pixelinformation in the current picture. When the blocks around the currentprediction unit are blocks having been subjected to the inter predictionand a reference pixel is a pixel having been subjected to the interprediction, reference pixels of the block having been subjected to theinter prediction can be replaced with the reference pixel information ofthe peripheral blocks having been subjected to the intra prediction.That is, when a reference pixel is not available, the reference pixelinformation not available can be replaced with at least one referencepixel of the available reference pixels.

The prediction mode of intra prediction includes a directive predictionmode in which reference pixel information is used depending on theprediction direction and a non-directive prediction mode in whichdirectivity information is not used to perform prediction. The mode forpredicting luma information and the mode for predicting chromainformation may be different from each other. Intra prediction modeinformation obtained by luma information or predicted luma signalinformation may be used to predict the chroma information.

When the size of a prediction unit and the size of a transform unit areequal to each other at the time of performing intra prediction, theintra prediction of the prediction unit can be performed on the basis ofpixels located on the left side of the prediction unit, a pixel locatedat the left-top end, and pixels located at the top. On the other hand,when the size of a prediction unit and the size of a transform unit aredifferent from each other at the time of perform intra prediction, theintra prediction can be performed using reference pixels based on thetransform unit. Intra prediction using N×N dividing for only the minimumcoding unit can be performed.

In the intra prediction method, an MDIS (Mode Dependent Intra Smoothing)filter is applied to reference pixels depending on the prediction modeand then a predicted block can be generated. The type of the MDIS filterapplied to the reference pixels may vary. In the intra predictionmethod, the intra prediction mode of a current prediction unit can bepredicted from the intra prediction mode of a prediction unit locatedaround the current prediction unit. When the prediction mode of thecurrent prediction unit is predicted using the mode informationpredicted from the peripheral prediction units and the intra predictionmodes of the current prediction unit and the peripheral prediction unitsare equal to each other, information representing that the predictionmodes of the current prediction unit and the peripheral prediction unitsare equal to each other can be transmitted using predetermined flaginformation. When the prediction modes of the current prediction unitand the peripheral prediction units are different from each other, theprediction mode information of the current block can be encoded byperforming entropy encoding.

A residual block including residual information which is a differencebetween a prediction unit subjected to the prediction and the originalblock of the prediction unit can be generated on the basis of theprediction unit generated by the prediction module 110. The generatedresidual block can be input to the transform module 115. The transformmodule 115 can transform the original block and the residual blockincluding the residual information of the prediction unit generated bythe prediction module 110 using a transform method such as DCT (DiscreteCosine Transform) or DST (Discrete Sine Transform). Which of the DCT andthe DST to use to transform the residual block can be determined on thebasis of the intra prediction mode information of the prediction unitused to generate the residual block.

The quantization module 120 can quantize values transformed into thefrequency domain by the transform module 115. The quantizationcoefficients can be changed depending on the block or the degree ofimportance of a picture. The values calculated by the quantizationmodule 120 can be supplied to the inverse quantization module 135 andthe rearrangement module 125.

The rearrangement module 125 can rearrange the coefficient valuesrelative to the quantized residual values.

The rearrangement module 125 can change two-dimensional block typecoefficients to one-dimensional vector type coefficients through the useof a coefficient scanning method. For example, the rearrangement module125 can scan DC coefficients to coefficients of the high frequencydomain using a zig-zag scanning method and can change the scannedcoefficients to one-dimensional vector type coefficients. A verticalscanning method of scanning two-dimensional block type coefficients inthe column direction and a horizontal scanning method of scanningtwo-dimensional block type coefficients in the row direction can be usedinstead of the zig-zag scanning method depending on the size of atransform unit and the intra prediction mode. That is, which of thezig-zag scanning method, the vertical scanning method, and thehorizontal scanning method to use can be determined depending on thesize of a transform unit and the intra prediction mode.

The entropy encoding module 130 can perform entropy encoding on thebasis of the values calculated by the rearrangement module 125. Variousencoding methods such as exponential golomb coding, VLC (Variable lengthCoding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can beused for the entropy encoding.

The entropy encoding module 130 can encode a variety of information suchas residual coefficient information and block type information of acoding unit, prediction mode information, dividing unit information,prediction unit information, transfer unit information, motion vectorinformation, reference frame information, block interpolationinformation, and filtering information from the rearrangement module 125and the prediction module 110.

The entropy encoding module 130 can entropy-encode coefficient values ofthe coding unit input from the rearrangement module 125.

The inverse quantization module 135 and the inverse transform module 140inversely quantize the values quantized by the quantization module 120and inversely transforms the values transformed by the transform module115. The residual values generated by the inverse quantization module135 and the inverse transform module 140 can be merged with theprediction unit, which is predicted by the motion vector predictionmodule, the motion compensation module, and the intra prediction moduleof the prediction module 110, to generate a reconstructed block.

The filter module 145 can include at least one of a deblocking filter,an offset correction module, and an ALF (Adaptive Loop Filter).

The deblocking filter 145 can remove block distortion generated due tothe boundary between blocks in the reconstructed picture. Whether thedeblocking filter should be applied to a current block can be determinedon the basis of the pixels included in several rows or columns of theblock. When the deblocking filter is applied to a block, a strong filteror a weak filter can be applied depending on the necessary deblockingfiltering strength. When performing horizontal filtering and verticalfiltering for applying the deblocking filter, the horizontal filteringand the vertical filtering can be performed in parallel.

The offset correction module can correct an offset of the picturesubjected to the deblocking from the original picture in the unit ofpixels. A method of dividing the pixels of a picture into apredetermined number of regions, determining a region to be subjected tothe offset correction, and applying the offset correction to thedetermined region or a method of applying the offset correction inconsideration of edge information of each pixel can be used to performthe offset correction on a specific picture.

The ALF (Adaptive Loop Filter) can perform filtering on the basis ofcomparison result of the filtered reconstructed picture and the originalpicture. The pixels included in a picture can be divided intopredetermined groups, a filter to be applied to each group can bedetermined, and the filtering can be differently performed for eachgroup. Information on whether the ALF should be applied and luma signalscan be transferred by the coding units (CU) and the size andcoefficients of the ALF to be applied to each block can vary. The ALFcan have various types and the number of coefficients included in thecorresponding filter can vary. The filtering-related information (suchas filter coefficient information, ALF ON/OFF information, and filtertype information) of the ALF can be included and transferred in apredetermined parameter set of a bitstream.

The memory 150 can store the reconstructed block or picture calculatedby the filter module 145 and the stored reconstructed block or picturecan be supplied to the prediction module 110 when performing the intraprediction.

FIG. 2 is a block diagram illustrating an image decoding deviceaccording another embodiment of the invention.

Referring to FIG. 2, an image decoding device 200 includes an entropydecoding module 210, a rearrangement module 215, an inverse quantizationmodule 220, an inverse transform module 225, a prediction module 230, afilter module 235, and a memory 240.

When an image bitstream is input from the image encoding device, theinput bitstream can be decoded in the inverse order of that in the imageencoding device.

The entropy decoding module 210 can perform entropy decoding in theinverse order of the order of performing the entropy encoding in theentropy encoding module of the image encoding device. The residualvalues subjected to the entropy decoding by the entropy decoding modulecan be input to the rearrangement module 215.

The entropy decoding module 210 can decode information associated withthe intra prediction and the inter prediction performed by the encodingdevice. As described above, when the image encoding device haspredetermined restrictions in performing the intra prediction and theinter prediction, the entropy decoding module can perform the entropydecoding based on the restrictions and can be supplied with theinformation of a current block associated with the intra prediction andthe inter prediction.

The rearrangement module 215 can perform rearrangement on the bitstreamentropy-decoded by the entropy decoding module 210 on the basis of therearrangement method of the encoding module. The rearrangement modulecan reconstruct and rearrange coefficients expressed in the form ofone-dimensional vector into two-dimensional block type coefficients. Therearrangement module can be supplied with information associated withthe coefficient scanning performed by the encoding module and canperform the rearrangement using a method of inversely scanning thecoefficients on the basis of the scanning order in which the scanning isperformed by the corresponding encoding module.

The inverse quantization module 220 can perform inverse quantization onthe basis of the quantization parameters supplied from the encodingdevice and the rearranged coefficient values of the block.

The inverse transform module 225 can perform the inverse DCT and inverseDST of the DCT and DST, which has been performed by the transformmodule, on the quantization result from the image encoding device. Theinverse transform can be performed on the basis of a transfer unitdetermined by the image encoding device. The transform module of theimage encoding device can selectively perform the DCT and DST dependingon plural information elements such as the prediction method, the sizeof the current block, and the prediction direction, and the inversetransform module 225 of the image decoding device can perform theinverse transform on the basis of the transform information on thetransform performed by the transform module of the image encodingdevice.

The inverse transform can be performed by the coding units instead ofthe transform units having been subjected to the transform.

The prediction module 230 can generate a predicted block on the basis ofpredicted block generation information supplied from the entropydecoding module 210 and the previously-decoded block or pictureinformation supplied from the memory 240.

As described above, similarly to the operation of the image encodingdevice, when the size of a prediction unit and the size of a transformunit are equal to each other at the time of performing the intraprediction, the intra prediction on the prediction unit is performed onthe basis of pixels located on the left side of the prediction unit, apixel located at the top-left corner, and pixels located on the topside. On the other hand, when the size of a prediction unit and the sizeof a transform unit are different from each other at the time of performintra prediction, the intra prediction can be performed using referencepixels based on the transform unit. Intra prediction using N×N dividingfor only the minimum coding unit can be performed.

The prediction module 230 includes a prediction unit determinationmodule, an inter prediction module, and an intra prediction module. Theprediction unit determination module can receive a variety ofinformation such as prediction unit information input from the entropydecoding module, prediction mode information of the intra predictionmethod, and motion prediction-related information of the interprediction method, can separate a prediction unit from the currentcoding unit, and can determine which of the inter prediction and theintra prediction should be performed on the prediction unit. The interprediction module can perform the inter prediction on the currentprediction unit on the basis of information included in at least onepicture of a previous picture and a subsequent picture of the currentpicture including the current prediction unit using informationnecessary for the inter prediction of the current prediction unitsupplied from the image encoding device.

In order to perform the inter prediction, it can be determined which ofa skip mode, a merging mode, and an AMVP mode is the motion predictionmethod of the prediction unit included in the coding unit on the basisof the coding unit.

Hereinafter, a method of constructing a predicted motion vectorcandidate list at the time of performing inter prediction using the AMVPmethod according to an embodiment of the invention will be describedbelow.

The intra prediction module can generate a predicted block on the basisof pixel information in the current picture. When a prediction unit isthe prediction unit subjected to the intra prediction, the intraprediction can be performed on the basis of the intra prediction modeinformation of the prediction unit supplied from the image encodingdevice. The intra prediction module include an MDIS filter, a referencepixel interpolation module, and a DC filter. The MDIS filter is a modulethat performs filtering on the reference pixels of the current block andcan be applied by determining whether the filter should be applieddepending on the prediction mode of the current prediction unit. TheMDIS filter can be performed on the reference pixels of the currentblock using the prediction mode of the prediction unit supplied from theimage encoding device and the MDIS filter information. When theprediction mode of the current block is a mode in which the MDISfiltering is not performed, the MDIS filter may not be applied.

When the prediction mode of the prediction unit is a prediction unit tobe subjected to the intra prediction on the basis of the pixel valuesobtained by interpolating the reference pixels, the reference pixelinterpolation module can generate reference pixels in the unit of pixelsless than an integer by interpolating the reference pixels. When theprediction mode of the current prediction unit is a prediction mode inwhich a predicted block is generated without interpolating the referencepixels, the reference pixels may not be interpolated. When theprediction mode of the current block is the DC mode, the DC filter cangenerate a predicted block through filtering.

The reconstructed block or picture can be supplied to the filter module235. The filter module 235 includes a deblocking filter, an offsetcorrection module, and an ALF.

Information on whether the deblocking filter is applied to thecorresponding block or picture and information on which of the strongfilter and the weak filter has been applied when the deblocking filterhas been applied can be supplied from the image encoding device. Thedeblocking filter of the image decoding device can be supplied with thedeblocking filter-related information from the image encoding device andcan perform deblocking filtering on the corresponding block in thedecoding device. Similarly to the image encoding device, the verticaldeblocking filtering and the horizontal deblocking filter are firstperformed, where at least one of the vertical deblocking filtering andthe horizontal deblocking filtering can be performed on an overlappingportion. The vertical deblocking filtering or the horizontal deblockingfiltering which is not previously performed can be performed on theportion in which the vertical deblocking filtering and the horizontaldeblocking filtering overlap. The parallel processing of the deblockingfiltering processes can be performed through this deblocking filtering.

The offset correction module can perform offset correction on thereconstructed picture on the basis of the type of the offset correctionapplied to the picture in encoding and the offset value information.

The ALF can perform the filtering on the basis of the comparison resultbetween the reconstructed picture subjected to the filtering and theoriginal picture. The ALF can be applied to the coding unit on the basisof the ALF application information and the ALF coefficient informationsupplied from the encoding device. The ALF information can be includedand supplied in a specific parameter set.

The memory 240 can store the reconstructed picture or block for use as areference picture or a reference block and can supply the reconstructedpicture to an output module.

As described above, in the embodiments of the invention, the coding unitis used as a term representing an encoding unit, but may be used as aunit of decoding as well as encoding.

An image encoding method and an image decoding method to be describedlater in the embodiments of the invention can be performed by theconstituents of the image encoding device and the image decoding devicedescribed above with reference to FIGS. 1 and 2. The constituents mayinclude software process units which can be performed throughalgorithms, as well as hardware constituents.

An intra prediction method according to an embodiment of the inventionmay be used instead of the existing intra prediction method, or may beselectively used along with the existing intra prediction mode on thebasis of flag information. The intra prediction mode according to theembodiment of the invention can be called advanced intra prediction(AIP) mode. Information of advanced_intra_pred_flag which is informationrepresenting whether prediction should be performed using the advancedintra prediction (AIP) mode or using a conventional prediction methodinstead of the advanced intra prediction (AIP) mode can be transmittedin a state where the information is loaded onto a predetermined genericsyntax structure such as a SPS (Sequence Parameter Set) or a PPS(Picture Parameter Set) or a slicer header. The AIP mode can betransmitted for a luma signal or a chroma signal. The AIP mode can betransmitted using advanced_intra_pred_flag for the luma signal, and canbe transmitted using advanced_intra_pred_chroma_flag for the chromasignal.

FIG. 3 is a diagram illustrating a prediction unit and reference pixelsin the embodiment of the invention.

Referring to FIG. 3, the reference pixels in the embodiment of theinvention can be classified into top reference pixels 300, a top-leftreference pixel 310, and left reference pixels 320.

When the size of a block is n×n and the number of top reference pixelsis n, a reference pixel located at a first position out of the topreference pixels is referred to as a first top reference pixel, a pixellocated on the leftmost side is referred to as an n-th top referencepixel, a pixel located on the top out of the left reference pixels isreferred to as a first left reference pixel, and a pixel located on thebottom is referred to as an n-th left reference pixel. In this way,sequentially, a pixel located at the (n+1)-th position on the just rightside of the n-th top reference pixel is referred to as an (n+1)-th topreference pixel 330, and a pixel located at the 2n-th position isreferred to as a 2n-th top reference pixel 340. Similarly, an (n+1)-thpixel located just below the n-th left reference pixel is referred to asan (n+1)-th left reference pixel 350 and a pixel located at the 2n-thposition is referred to as a 2n-th bottom reference pixel 360.

Columns and rows in a prediction unit can be expressed by first to n-throws and first to n-th columns with respect to the row and columnincluding pixels.

FIG. 4 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 4, a bottom-right pixel 410 is set to a DC-predictedvalue so as to perform intra prediction using a DC mode (400).

The DC-predicted value can be derived using the average value of the topreference pixels, the left reference pixels, and the top-left pixel, andthis value can be used as the predicted value of the bottom-right pixel410.

The predicted values of the n-th column can be derived using thebottom-right pixel 410 and the n-th top reference pixel 423, and thepredicted values of the n-th row can be derived using the bottom-rightpixel 410 and the n-th left reference pixel 426 (420).

Bidirectional linear prediction is performed to derive the predictedvalues of pixels included in the remaining prediction unit other thanthe n-th row and the n-th column (440).

That is, the predicted values of the pixels included in the remainingprediction unit other than the n-th row and the n-th column can begenerated by performing linear prediction on the top reference pixel 445located on the top in the vertical direction, the pixel 450 in the n-throw located on the bottom in the vertical direction, the left referencepixel 455 located on the left in the horizontal direction, and the pixel460 in the n-th column on the right side in the horizontal direction.

FIG. 5 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 5, a bottom-right pixel 520 is generated using theaverage value of the top-left reference pixel 505, the n-th topreference pixel 510, and the n-th left reference pixel 515 (500).

The generated bottom-right pixel 520 and the n-th top reference pixel525 are interpolated to generate the predicted values of the pixels 530included in the n-th column, and the generated bottom-right pixel 520and the n-th left reference pixel 535 are interpolated to generate thepredicted values of the pixels 537 included in the n-th row.

Linear interpolation is performed and predetermined weight values aregiven to the bottom-right pixel 520 and the n-th top reference pixel 525to generate the predicted values of the pixels included in the n-thcolumn. Similarly, the bottom-right pixel 520 and the n-th leftreference pixel 535 are interpolated to generate the predicted values ofthe pixels included in the n-th row.

The predicted values of the pixels included in the remaining predictionunit other than the n-th row and the n-th column are derived byperforming bidirectional linear prediction on the basis of the topreference pixels 545 located on the top in the vertical direction, theleft reference pixels 550, the generated predicted values of the pixels555 included in the n-th row, and the generated predicted values of thepixels 557 included in the n-th column (560).

FIG. 6 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 6, the bottom-right pixel is set to a DC-predictedvalue (600).

The DC-predicted value of the bottom-right pixel 610 can be generated bycalculating the average value of the top reference pixels, the leftreference pixels, and the top-left pixel.

The n-th top reference pixel 615 and the bottom-right pixel 610 areinterpolated to generate the predicted values of the pixels included inthe n-th column, and the n-th left reference pixels 617 and thebottom-right reference pixel 610 are interpolated to generate thepredicted values of the pixels included in the n-th row (620).

The predicted values of the pixels included in the remaining predictionunit other than the n-th row and the n-th column are generated on thebasis of the reference pixel values present in the diagonal directionand the predicted pixel values of the n-th row and the n-th column(640).

First predicted values of the pixels included in the remainingprediction unit other than the n-th row and the n-th column can begenerated by performing linear interpolation using one pixel valuepresent on the top-right side in the diagonal direction out of theexisting reference pixel values and the pixel values of the n-th row andthe n-th column and one pixel value present on the bottom-left side.

Second predicted values 670 are generated by performing bidirectionallinear prediction using two pixels in the horizontal direction and twopixels in the vertical direction, which are present around the firstpredicted values of the pixels included in the remaining prediction unitother than the n-th row and the n-th column (660).

The pixel 675 located just above in the vertical direction of thecurrent prediction pixel, the pixel 680 located just below in thevertical direction of the current prediction pixel, the pixel 685located on the just left side in the horizontal direction of the currentprediction pixel, and the pixel 690 located on the just right side inthe horizontal direction of the current prediction pixel areinterpolated to generate the second predicted values 670.

FIG. 7 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 7, the bottom-right pixel 710 is generated (700) usingthe average of the top-left reference pixel 703, the n-th top referencepixel 706, and the n-th left reference pixel 709.

The n-th top reference pixel 706 and the bottom-right pixel 710 areinterpolated to generate the predicted values 713 of the pixels includedin the n-th column, and the n-th left reference pixels 709 and thebottom-right pixel 710 are interpolated to generate the predicted valuesof the pixels 715 included in the n-th row (720).

The predicted values of the pixels included in the remaining predictionunit other than the n-th row and the n-th column are generated on thebasis of the reference pixel values located in the diagonal directionand the predicted pixel values of the n-th row and the n-th column(740).

The first predicted values of the pixels included in the remainingprediction unit other than the n-th row and the n-th column can begenerated by performing interpolation using one pixel value located onthe top-right side in the diagonal direction (for example, 45 degrees)out of the existing reference pixel values and the predicted pixelvalues of the n-th row and the n-th column and one pixel value locatedon the bottom-left side.

The second predicted values are generated by performing bidirectionallinear prediction using two pixels in the horizontal direction and twopixels in the vertical direction located around the first predictedvalues of the pixels included in the remaining prediction unit otherthan the n-th row and the n-th column (760).

The pixel 745 located just above in the vertical direction of thecurrent prediction pixel, the pixel 750 located just below in thevertical direction of the current prediction pixel, the pixel 755located on the just left side in the horizontal direction of the currentprediction pixel, and the pixel 757 located on the just right side inthe horizontal direction of the current prediction pixel areinterpolated to generate the second predicted values 770.

FIG. 8 is a conceptual diagram illustrating an intra prediction methodusing an advanced vertical mode according to an embodiment of theinvention.

Referring to FIG. 8, the average values of the n-th left reference pixel810 and each of the top reference pixel values are inserted into then-th row (800).

Each pixel included in the n-th row may have the average value of thevalue the pixel included in the same column out of the top referencepixels and the n-th bottom-left reference pixel.

The predicted values of the pixels included in the rows other than then-th row are generated by interpolating the pixels included in the n-throw and the top reference pixel values (850).

By employing this method, it is possible to express pixel valueinformation linearly varying in the units of rows.

FIG. 9 is a conceptual diagram illustrating an intra prediction methodusing an advanced horizontal mode according to an embodiment of theinvention.

Referring to FIG. 9, the average values of the (n+1)-th top referencepixel and each of the left reference pixels are inserted into the n-thcolumn (900).

Each pixel included in the n-th column may have the average value of thevalue of the pixel included in the same row out of the left referencepixels and the (n+1)-th top reference pixel.

In another method, the average pixel values of the n-th top referencepixel and each of the left reference pixels may be inserted into then-th column (925).

That is, each pixel included in the n-th column may have the averagevalue of the pixel included in the same row out of the left referencepixels and the n-th top reference pixel.

The predicted values of the pixels included in the columns other thanthe n-th column by interpolating the pixels included in the n-th columnand the top reference pixel values (950).

By employing this method, it is possible to express pixel valueinformation varying in the units of rows.

FIG. 10 is a conceptual diagram illustrating a method of deriving aprediction unit using an advanced planar mode according to an embodimentof the invention.

Referring to FIG. 10, the predicted value of the bottom-right pixel 1000is derived to perform intra prediction using the planar mode. Theinterpolated value of the derived predicted value of the bottom-rightpixel 1000 and the n-th left reference pixel 1010 is used as thepredicted values of the pixels included in the n-th row, and theinterpolated value of the derived predicted value of the bottom-rightpixel 1000 and the n-th top reference pixel 1020 is used as thepredicted values of the pixels included in the n-th column.

The predicted values of the pixels included in the remaining predictionunit other than the n-th row and the n-th column can be derived byperforming bidirectional interpolation on the basis of the top referencepixels, the left reference pixels, the top-left reference pixel, and thepredicted pixel values of the n-th column and the n-th row generated inthe previous step.

Here, the bottom-right pixel can be derived using various methods. FIGS.11 to 14 show methods of deriving the bottom-right pixel according to anembodiment of the invention.

FIG. 11 is a conceptual diagram illustrating a method of deriving thebottom-right pixel in an intra prediction method using an advancedplanar mode according to an embodiment of the invention.

Referring to FIG. 11, the bottom-right pixel can be derived from theaverage value of the n-th left reference pixel 1100 and the n-th topreference pixel 1110.

That is, by employing the method of deriving the bottom-right pixelvalue using only two pixel values, it is possible to reduce calculationcomplexity.

FIG. 12 is a conceptual diagram illustrating a method of deriving thebottom-right pixel in an intra prediction method using an advancedplanar mode according to an embodiment of the invention.

Referring to FIG. 12, the bottom-right pixel can be derived from theaverage value the 2n-th top reference pixel 1200 and the 2n-th leftreference pixel 1210.

That is, it is possible to derive the bottom-right pixel using only twopixel values, unlike the existing methods.

When a prediction unit is located at an edge and the 2n-th top referencepixel 1200 and the 2n-th left reference pixel 1210 are not present, thebottom-right pixel may be generated using the n-th left reference pixelvalue and the n-th top reference pixel value as shown in FIG. 11, or thebottom-right pixel may be generated using another method.

FIG. 13 is a conceptual diagram illustrating a method of deriving thebottom-right pixel in an intra prediction method using an advancedplanar mode according to an embodiment of the invention.

Referring to FIG. 13, the bottom-right pixel can be derived using a topaverage pixel 1320 generated on the basis of the average value of then-th top reference pixel 1300 and the 2n-th top reference pixel 1310 anda left average pixel 1350 derived on the basis of the average value ofthe n-th left reference pixel 1330 and the 2n-th left reference pixel1340.

That is, the bottom-right pixel can be derived on the basis of theaverage value of the top average pixel 1320 and the left average pixel1350.

When a prediction unit is located at an edge and the corresponding pixelis not present, the bottom-right pixel may be generated using the n-thleft reference pixel value and the n-th top reference pixel value asshown in FIG. 11, or the bottom-right pixel may be generated usinganother method.

FIG. 14 is a conceptual diagram illustrating a method of deriving thebottom-right pixel in an intra prediction method using an advancedplanar mode according to an embodiment of the invention.

Referring to FIG. 14, the bottom-right pixel 1460 can be generated usingthe average value of a top middle pixel 1420 located in the middlebetween the n-th top reference pixel 1400 and the 2n-th top referencepixel 1410 and a left middle pixel 1450 located in the middle betweenthe n-th left reference pixel 1430 and the 2n-th left reference pixel1440. The pixel located in the middle may be the (n+n/2)-th top or leftreference pixel located at the (n+n/2)-th or ((n+n/2)+1)-th position, ormay be the ((n+n/2)+1)-th top or left reference pixel.

When a prediction unit is located at an edge and the corresponding pixelis not present, the bottom-right pixel may be generated using the n-thleft reference pixel value and the n-th top reference pixel value, orthe bottom-right pixel may be generated using another method.

FIGS. 15 and 16 are conceptual diagrams illustrating a method ofgenerating the n-th row and the n-th column included in a predictionunit by interpolation in performing an advanced planar prediction mode.

FIG. 15 is a conceptual diagram illustrating a method of generating then-th row and the n-th column in performing an advanced planar modeaccording to an embodiment of the invention. Referring to FIG. 15, thepredicted values of the pixels other than the bottom-right pixelincluded in the n-th column can be generated by copying the pixels offrom the (n+1)-th top reference pixel to the (2n−1)-th top referencepixel.

The predicted values of the pixels other than the bottom-right pixelincluded in the n-th row can be generated by copying the pixels of fromthe (n+1)-th left reference pixel to the (2n−1)-th left reference pixel.The predicted value of the bottom-right pixel can be generated bycalculating the average value of the 2n-th top Pixel and the 2n-th leftpixel.

FIG. 16 is a conceptual diagram illustrating a method of generating then-th row and the n-th column in performing an advanced planar modeaccording to an embodiment of the invention.

Referring to FIG. 16, the predicted values of the n-th column can begenerated using the pixels generated by linearly predicting the pixelsof from the (n+1)-th top reference pixel to the (2n−1)-th top referencepixel and the pixels of from the (n+1)-th left reference pixel to the(2n−1)-th left reference pixel depending on the distance therebetween.For example, the predicted value of the second pixel 1600 in the n-thcolumn can be generated by linearly interpolating the (n+2)-th topreference pixel and the (n+2)-th left reference pixel.

Similarly, the predicted values of the n-th row can be generated usingthe pixels generated by linearly predicting the pixels of from the(n+1)-th top reference pixel to the (2n−1)-th top reference pixel andthe pixels of from the (n+1)-th left reference pixel to the (2n−1)-thleft reference pixel depending on the distance therebetween. Forexample, the predicted value of the second pixel in the n-th row can begenerated by linearly interpolating the (n+2)-th top reference pixel andthe (n+2)-th left reference pixel.

By employing this method, the predicted pixel values of the n-th row andthe n-th column can be generated so as to have a more influence on apixel value having a smaller distance and then prediction using theplanar mode can be performed.

FIG. 17 is a conceptual diagram illustrating an intra prediction methodusing an advanced planar mode according to an embodiment of theinvention.

Referring to FIG. 17, four pixels can be used to generate the predictedvalue of each pixel included in a prediction unit.

The first pixel 1700 may be one pixel out of from the first topreference pixel to the n-th top reference pixel located above in thevertical direction of a prediction target pixel. The second pixel 1720may be a pixel located below in the vertical direction of the predictiontarget pixel and may have a value obtained by copying the 2n-th leftreference pixel 1725.

The third pixel 1740 may be one pixel out of from the first leftreference pixel to the n-th left reference pixel located on the leftside in the horizontal direction of the prediction target pixel. Thefourth pixel 1760 may be a pixel located on the right side in thehorizontal direction of the prediction target pixel and may have a valueobtained by copying the 2n-th top reference pixel 1765.

In the planar prediction method according to an embodiment of theinvention, the predicted values of the pixels included in the predictionunit can be generated using a method of performing bidirectional linearinterpolation on the first pixel to the fourth pixel.

FIG. 18 is a conceptual diagram illustrating an intra prediction methodusing a planar mode according to an embodiment of the invention.

Referring to FIG. 18, weight values of a predetermined ratio may begiven to the predicted value in the horizontal direction and thepredicted value in the vertical direction to generate the predictedvalues of the prediction unit when performing prediction using a planarmode.

The predicted value in the horizontal direction can be derived byinterpolating the value of the pixel located in the same row as theprediction target pixel out of the left reference pixels and the n-thtop reference pixel (1800).

The predicted value in the vertical direction can be derived byinterpolating the value of the pixel located in the same column as theprediction target pixel out of the top reference pixels and the n-thleft reference pixel (1850).

The predicted value in the horizontal direction and the predicted valuein the vertical direction can be generated by multiplying them by weightvalues.

Mathematical Expression 1 represents that a predicted value is generatedon the basis of a weight value.

$\begin{matrix}{{P\left( {x,y} \right)} = {{\frac{y + 1}{x + y + 2} \times {Horz}} + {\frac{x + 1}{x + y + 2} \times {Vert}}}} & {{Mathematical}\mspace{14mu}{Expression}\mspace{14mu} 1}\end{matrix}$

Referring to Mathematical Expression 1, a larger weight value is givento a closer direction depending on whether which direction is the closerdirection among the horizontal direction and the vertical direction togenerate the predicted value.

FIG. 19 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 19, when performing intra prediction using an advancedDC mode, the top reference pixels and the left reference pixels may becopied to the pixels of the first row and the first column of theprediction unit so as to minimize discontinuity from neighboringprediction units. The predicted value of the pixel located in the firstrow and the first column can be derived using the first pixel value ofthe top reference pixels or the first pixel value of the left referencepixels, the first pixel value of the top reference pixels or the firstpixel value of the left reference pixels. The predicted values of thepixels other than the first row and the second column can be generatedby performing the intra prediction using the DC mode on the basis of thepredicted values of the first row and the first column of the predictionunit.

FIG. 20 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to the left part of FIG. 20, in performing an intra predictionusing an advanced DC mode, the predicted values can be generated bycalculating the average value of the first top reference pixel which isthe first pixel of the top reference pixels, the n-th top referencepixel which is the n-th pixel of the top reference pixels, the firstleft reference pixel which is the first pixel of the left referencepixels, and the n-th left reference pixel which is the n-th pixel of theleft reference pixels. That is, it is possible to reduce calculationcomplexity when performing an intra prediction through the use of amethod of deriving the predicted values of the pixels included in aprediction unit using only partial pixels of the reference pixels.

Referring to the right part of FIG. 20, in performing an intraprediction using an advanced DC mode, the predicted values can begenerated by calculating the average value of the n-th top referencepixel which is the n-th pixel of the top reference pixels, the n-th leftreference pixel which is the n-th pixel of the left reference pixels,and the top-left reference pixel. That is, similarly to the left part ofFIG. 20, it is possible to reduce calculation complexity by using onlypartial pixels of the reference pixels.

FIG. 21 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 21, in the intra prediction method using an advancedDC mode, the pixels of the first column and the first row are set to theDC-predicted values derived using the reference pixels (2100).

The DC-predicted values included in the first row and the first columnmay be the average values of the top reference pixels, the top-leftreference pixel, and the left reference pixels.

A filtering operation is performed using the top reference pixels, theleft reference pixels, and the top-left reference pixel (2120).

The pixels included in the first column and the first row other than thepixel located at the intersection of the first row and the first columnin a prediction unit can be filtered using the reference pixels and a2-tap filter. The pixel located at the intersection of the first row andthe first column in the prediction unit can be filtered on the basis ofthe first top reference pixel and the first left reference pixel using a3-tap filter.

The intra prediction using the DC mode is performed on the basis of thefiltered pixels included in the first column and the first row togenerate the predicted values of the pixels included in the predictionunit (2140). The intra prediction using the DC mode can be performedusing the average value of the filtered pixels located in the firstcolumn and the first row.

FIG. 22 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 22, the pixel values included in the first row and thefirst column of the prediction unit can be predicted by performing anintra prediction using a DC mode on the basis of the reference pixels(2200).

The intra-predicted values in the DC mode may be the average values ofthe top reference pixels, the top-left reference pixel, and the leftreference pixels as shown in FIG. 21.

A filtering operation is performed using the top reference pixels, theleft reference pixels, the top-left reference pixel, and the generatedpixels included in the first row and the first column (2220).

The predicted pixels of the first column and the first row can befiltered using a 2-tap filter and the reference pixel values. The pixellocated at the intersection of the first row and the first column can befiltered on the basis of the first top reference pixel and the firstleft reference pixel using a 3-tap filter.

The predicted values of the pixels included in the prediction unit otherthan the first row and the first column can be generated by calculatingthe average values of the pixel values located on the top and left sides(2240).

FIG. 23 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 23, the top reference pixels and the left referencepixels are used as the predicted pixels of the prediction unit (2300).The top reference pixels and the left reference pixels can be used asthe predicted values of the pixels included in the first column and thefirst row of the prediction unit.

The predicted values of the pixels of the first row and the first columnmay be derived on the basis of at least one of the first left referencepixels value and the first top reference pixel value.

As for the pixels in the remaining prediction unit other than the pixelsincluded the first row and the first column, first predicted values canbe derived by performing DC mode prediction on the basis of the pixelvalues of the first row and the first column (2320).

As for the predicted values in the prediction unit other than the pixelvalues included in the first row and the first column, second predictedvalues can be generated by calculating the average values of the pixelvalues located on the top and left sides (2340).

FIG. 24 is a conceptual diagram illustrating an intra prediction methodusing an advanced DC mode according to an embodiment of the invention.

Referring to FIG. 24, the predicted values in the DC mode are derivedusing the reference pixels.

The DC-predicted values can be derived by calculating the average valuesof the top reference pixels, the top-left reference pixel, and the leftreference pixels.

Mathematical Expression 2 represents a method of deriving a predictedvalue using a DC mode.DC _(pred) ={P(−1,H−1)+ . . . +P(−1,0)+P(−1,−1)+P(0,−1)+ . . .+P(W−1,−1)}/(W+H+1)  Mathematical Expression 2

A Deviation value between the predicted value using a DC mode for eachreference pixel and the value of the corresponding reference pixel canbe derived. Mathematical Expression 3 represents the value of thereference pixel and the predicted value using the DC mode.D _(V)(x)=DC _(pred) −P(x,−1),x=0˜W−1D _(H)(x)=DC _(pred) −P(−1,y),y=0˜H−1  Mathematical Expression 3

The predicted values of the pixels included in a prediction unit can bederived using the DC-predicted values derived by Mathematical Expression2 and the average values of the x-direction deviations and they-direction deviations derived by Mathematical Expression 3.P(x,y)=DC _(pred)+(D _(V)(x)+D _(H)(y))>>1,x=0˜W−1,y=0˜H−1  MathematicalExpression 4

By performing the intra prediction in this way and adding or subtractingthe deviation values in the corresponding column and the correspondingrow to or from the DC-predicted values, it is possible to reflect thecharacteristics of the rows and the columns.

FIG. 25 is a conceptual diagram illustrating an intra prediction methodusing an advanced planar mode according to an embodiment of theinvention.

Referring to FIG. 25, in performing a planar prediction mode, verticalinterpolation can be performed using the pixel 2500 located above in thevertical direction in the same column as the current prediction pixeland included in the top reference pixels and the 2n-th left referencepixel 2510 which is the 2n-th pixel of the left reference pixels.Horizontal interpolation can be performed using the left reference pixelvalue 2520 located on the left side in the horizontal direction of thecurrent prediction pixel and included in the same row as the currentprediction pixel and the 2n-th top reference pixel 2530 which is the2n-th reference pixel of the top reference pixels.

When the 2n-th left reference pixel 2510 or the 2n-th top referencepixel 2530 is not present, the horizontal interpolation or the verticalinterpolation can be performed using the n-th left reference pixel orthe n-th top reference pixel.

FIG. 26 is a conceptual diagram illustrating a method of performing aplanar mode prediction when the 2n-th left reference pixel or the 2n-thtop reference pixel are not present according to an embodiment of theinvention.

The left part of FIG. 26 shows a case where at least one of the 2n-leftreference pixel and the 2n-th top reference pixel is not present.

When the 2n-th left reference pixel is not present, the interpolationcan be performed using the n-th left reference pixel instead of the2n-th left reference pixel. When the 2n-th top reference pixel is notpresent, the interpolation can be performed using the n-th top referencepixel instead of the 2n-th top reference pixel.

The right part of FIG. 26 shows a case where the 2n-th left referencepixel and the 2n-th top reference pixel are not present. When the 2n-thleft reference pixel and the 2n-th top reference pixel are not present,the planar mode can be performed using the n-th left reference pixel andthe n-th top reference pixel.

The image encoding method and the image decoding method described abovecan be embodied by the constituent modules of the image encoding deviceand the image decoding device described above with reference to FIGS. 1and 2.

While the invention has been described with reference to theembodiments, it will be able to be understood by those skilled in theart that the invention can be modified and changed in various formswithout departing from the spirit and scope of the invention describedin appended claims.

The invention claimed is:
 1. A method of image decoding, by a decodingapparatus, comprising: obtaining information on a prediction mode from abitstream; determining an intra prediction mode for a current blockbased on the information on the prediction mode; deriving a predictionsample on the current block based on the intra prediction mode andneighboring samples of the current block; and generating a reconstructedsample based on the prediction sample, wherein the prediction sample isderived by using 4 samples among the neighboring samples, wherein the 4samples include a first sample located in a same column with theprediction sample, a second sample located in a right side of the firstsample, a third sample located in a same row with the prediction sample,and a fourth sample located in a lower side of the third sample, whereinthe first sample and the second sample are located in an upper side ofthe current block, and the third sample and the fourth sample arelocated in a left side of the current block, and wherein the secondsample is located in a right side with respect to a right boundary ofthe current block, and the fourth sample is located in a lower side withrespect to a lower boundary of the current block, wherein the secondsample is located in a right side of a right-most sample amongneighboring samples adjacent to an upper boundary of the current block,and wherein the fourth sample is located in a lower side of a lowestsample among neighboring samples adjacent to a left boundary of thecurrent block.
 2. The method of claim 1, wherein the second sample islocated in an upper right side of the current block, and the fourthsample is located in a lower left side of the current block.
 3. Themethod of claim 1, wherein when the current block is a block of N×N size(N is integer and N>0), and wherein the second sample is located atamong (N+1)-th through 2N-th, inclusive, sample positions with regard tox-axis in the upper side of the current block, and the fourth sample islocated at among (N+1)-th through 2N-th, inclusive, sample positionswith regard to y-axis in the left side of the current block.
 4. Themethod of claim 3, wherein the second sample is located at the 2N-thsample position with regard to the x-axis in the upper side of thecurrent block, and the fourth sample is located at the 2N-th sampleposition with regard to the y-axis in the left side of the currentblock.
 5. The method of claim 1, wherein the prediction sample in thecurrent block is derived based on the bi-directional interpolationaccording to a distance between the prediction sample and the firstsample, a distance between the prediction sample and the second sample,a distance between the prediction sample and the third sample and adistance between the prediction sample and the fourth sample.
 6. Themethod of claim 5, wherein weight is applied to each of the values ofthe 4 samples which is used for the bi-directional interpolation.
 7. Themethod of claim 1, wherein the prediction sample in the current block isderived based on the bi-directional interpolation according to avertical distance between the prediction sample and the first sample, avertical distance between the prediction sample and the fourth sample, ahorizontal distance between the prediction sample and the second sample,and a horizontal distance between the prediction sample and the thirdsample.
 8. A decoding apparatus for image decoding, comprising: anentropy decoding module configured to obtain information on a predictionmode from a bitstream; a prediction module configured to determine anintra prediction mode for a current block based on the information onthe prediction mode, to derive a prediction sample on the current blockbased on the intra prediction mode and neighboring samples of thecurrent block; and an adder module configured to generate areconstructed sample based on the prediction sample, wherein theprediction module derives the prediction sample by using 4 samples amongthe neighboring samples, wherein the 4 samples include a first samplelocated in a same column with the prediction sample, a second samplelocated in a right side of the first sample, a third sample located in asame row with the prediction sample, and a fourth sample located in alower side of the third sample, wherein the first sample and the secondsample are located in an upper side of the current block and the thirdsample and the fourth sample are located in a left side of the currentblock, and wherein the second sample is located in a right side withrespect to a right boundary of the current block, and the fourth sampleis located in a lower side with respect to a lower boundary of thecurrent block, wherein the second sample is located in a right side of aright-most sample among neighboring samples adjacent to an upperboundary of the current block, wherein the fourth sample is located in alower side of a lowest sample among neighboring samples adjacent to aleft boundary of the current block.
 9. The apparatus of claim 8, whereinthe second sample is located in an upper right side of the currentblock, and the fourth sample is located in a lower left side of thecurrent block.
 10. The apparatus of claim 8, wherein when the currentblock is a block of N×N size (N is integer and N>0), wherein the secondsample is located at among (N+1)-th through 2N-th, inclusive, samplepositions with regard to an x-axis in the upper side of the currentblock, and the fourth sample is located at among (N+1)-th through 2N-th,inclusive, sample positions with regard to a y-axis in the left side ofthe current block.
 11. The apparatus of claim 10, wherein the secondsample is located at the 2N-th sample position with regard to the x-axisin the upper side of the current block, and the fourth sample is locatedat the 2N-th sample position with regard to the y-axis in the left sideof the current block.
 12. The apparatus of claim 8, wherein theprediction module derives the prediction sample based on thebi-directional interpolation according to a distance between theprediction sample and the first sample, a distance between theprediction sample and the second sample, a distance between theprediction sample and the third sample and a distance between theprediction sample and the fourth sample.
 13. The apparatus of claim 12,wherein weight is applied to each of the values of the 4 samples whichis used for the bi-directional interpolation.
 14. The apparatus of claim8, wherein the prediction module derives the prediction sample based onthe bi-directional interpolation according to a vertical distancebetween the prediction sample and the first sample, a vertical distancebetween the prediction sample and the fourth sample, a horizontaldistance between the prediction sample and the second sample, and ahorizontal distance between the prediction sample and the third sample.